<template>
    <el-button
        :disabled="disabled"
        type="primary"
        icon="Connection"
        class="table-button"
        @click="relatedFun"
        >相关</el-button
    >
    <relatedInfor
        :projectNum="currentRow.styleNum ? undefined : currentRow.projectNum"
        :styleNum="currentRow.styleNum"
        v-model:dialogVisible="dialogVisible"
        :modalType="props.modalType"
        :ID="currentRow.ID"
        v-if="dialogVisible"
    />
</template>

<script setup>
import relatedInfor from "@/components/relatedInfor/index.vue";
import { ref, reactive, computed, defineProps } from "vue";

const props = defineProps({
    row: {
        type: Object,
        default: {},
    },
    modalType: {
        type: String,
        default: "",
    },
    disabled:{
        type: Boolean,
        default: true,
    },
});
// 相关
const currentRow = ref({});
const dialogVisible = ref(false);
const relatedFun = () => {
    dialogVisible.value = true;
    currentRow.value = props.row;
};
</script>

<style lang="scss" scoped>
</style>